package com.blog.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.blog.entity.SysMenu;
import com.blog.util.tree.XmTreeVo;
import com.blog.vo.menu.SysMainMenuVo;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
import java.util.Map;

/**
 * @author gxcc3
 */
@Mapper
public interface SysMenuMapper extends BaseMapper<SysMenu> {

    /**
     * 根据用户id获取系统左侧菜单导航
     * @param userId
     * @return
     */
    List<SysMainMenuVo> getMenuListById(String userId);

    /**
     * 后台获取表格信息
     * @return
     */
    List<Map<String,Object>> tableList();

    /**
     * 获取xm下拉选树形数据
     * @param
     * @return
     */
    List<XmTreeVo> queryMenuXmTree();

    /**
     * 根据用户id获取用户perms
     * @param id
     * @return
     */
    List<String> selectPermsByUserId(String id);
}
